/**
 * Copyright &copy; 2015-2020 <a href="http://www.easyhis.com/">easyhis</a> All rights reserved.
 */
package com.easy.dfcshop.entity;

import com.easy.common.utils.excel.annotation.ExcelField;
import com.easy.core.persistence.DataEntity;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 商品赠品Entity
 * @author waylen chi
 * @version 2018-01-17
 */
public class ProductGift extends DataEntity<ProductGift> {
	
	private static final long serialVersionUID = 1L;
	private Integer giftId;		// gift_id
	private Integer productId;		// 商品内部ID
	private Integer giftProductId;		// 赠送商品内部ID，外键（product)
	private Date startTime;		// 赠送开始日期
	private Date endTime;		// 赠送结束日期
	private Integer minNum;		// 送赠品要求购买该商品最小数量
	private Integer giftNum;		// 按销售单位（minNum）配送赠品数
	private Integer giftMaxnum;		// 单个订单最多送的赠品数量，0-不限制
	private String remarks;		// 备注描述
	
	public ProductGift() {
		super();
	}

	@NotNull(message="gift_id不能为空")
	@ExcelField(title="gift_id", align=2, sort=0)
	public Integer getGiftId() {
		return giftId;
	}

	public void setGiftId(Integer giftId) {
		this.giftId = giftId;
	}
	
	@ExcelField(title="商品内部ID", align=2, sort=1)
	public Integer getProductId() {
		return productId;
	}

	public void setProductId(Integer productId) {
		this.productId = productId;
	}
	
	@ExcelField(title="赠送商品内部ID，外键（product)", align=2, sort=2)
	public Integer getGiftProductId() {
		return giftProductId;
	}

	public void setGiftProductId(Integer giftProductId) {
		this.giftProductId = giftProductId;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="赠送开始日期", align=2, sort=3)
	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="赠送结束日期", align=2, sort=4)
	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	
	@ExcelField(title="送赠品要求购买该商品最小数量", align=2, sort=5)
	public Integer getMinNum() {
		return minNum;
	}

	public void setMinNum(Integer minNum) {
		this.minNum = minNum;
	}
	
	@ExcelField(title="按销售单位（minNum）配送赠品数", align=2, sort=6)
	public Integer getGiftNum() {
		return giftNum;
	}

	public void setGiftNum(Integer giftNum) {
		this.giftNum = giftNum;
	}
	
	@ExcelField(title="单个订单最多送的赠品数量，0-不限制", align=2, sort=7)
	public Integer getGiftMaxnum() {
		return giftMaxnum;
	}

	public void setGiftMaxnum(Integer giftMaxnum) {
		this.giftMaxnum = giftMaxnum;
	}
	
	@ExcelField(title="备注描述", align=2, sort=8)
	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
	
}